package com.sxhuayuan.parking.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;

/** 优惠卷类 */
@Entity
@Table(name = "hypk_coupon")
public class Coupon extends BaseEntity {

	private static final long serialVersionUID = -3824924975690104657L;

	private Long id;

	private String money; // 优惠卷金额

	private String code; // 优惠卷唯一标识

	private Member member;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getMoney() {
		return money;
	}

	public void setMoney(String money) {
		this.money = money;
	}

	@JsonIgnore
	@JSONField(serialize = false)
	@ManyToOne(fetch = FetchType.LAZY)
	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	@Column(length = 64, unique = true)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
}
